-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HADOOP-19740. S3A: add explicit "sdk" and "ec2" regions for region resolution. #8058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
|
💔 -1 overall
This message was automatically generated. |
|
running full test suites with java17 and the test region set to sdk. as usual, it's that forked |
…solution. * Pull out region resolution to new class RegionResolution for isolation and testing through TestRegionResolution. * Add new "sdk" and "ec2" mappings to hand down to SDK * Test in ITestS3AEndpointRegion to verify that either the SDK fails to resolve with an SDK message or it does resolve to *something* and the test assert fails instead.
IF the region == ec2 then we don't handle off to the SDK chain, instead only use the bit of the SDK for metadata retrieval. Nominally private/unstable, but cloudstore has used it in the past... If it is removed after an SDK update, we will have to handle it.
ec5ae6b to
6f662bf
Compare
|
💔 -1 overall
This message was automatically generated. |
...and no attempt to fall back to central-1 here. You no longer need to declare a region for a third party store; endpoint is enough.
|
💔 -1 overall
This message was automatically generated. |
|
also, I think we may want to add an enum of fallbacks this would define the policy for calculating the region of a bucket which isn't set explicitly, or inferred from the endpoint (vpce, aws, external). today's behaviour is "central", which doesn't work when the network is locked down in a VPC in a different region. if you set ec2 or sdk, then unless the region is declared (or set to those explicit region names) then the fallback will be whichever of the defaults. There's one more thing to consider here: should we always do an EC2/IAM probe before falling back to central? I think the fallback option has better compatibility. now, given we are doing ec2 region resolution in our own code, we have a choice of what to do when the resolution fails. so what does mean? so maybe we only need two fallbacks |
|
@mukund-thakur @ahmarsuhail thoughts on what I'm doing here? I'm coming round to
|
How was this patch tested?
New tests.
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?